from selenium.webdriver.common.by import By
from appium.webdriver.common.touch_action import TouchAction
import time

from utils import connect_app,get_elements,input_text,is_located,get_element,handler_swipe
#连接
driver=connect_app()
#driver.start_activity('com.myzaker.ZAKER_Phone', 'view.boxview.BoxViewActivity')
time.sleep(10)
#
ele=is_located(driver,By.XPATH,'//*[@text="WLAN"]')

ele.click()
#wlamSSID
Wire_ele=get_element(driver,By.XPATH,'//*[@text="WiredSSID"]')
touch_obj=TouchAction(driver)
touch_obj.long_press(Wire_ele,duration=1000).perform()
time.sleep(3)
touch_obj.press(Wire_ele).wait(1000).release().perform()
driver.quit()

